package dbreflection.dbanalisys;

import java.util.HashMap;

/**
 * User: J0k3r
 * Date: 14.12.2006
 * Time: 9:15:03
 */
public class DBScheme
{
    private String schemeName;
    private HashMap<String , DBTable> tables = new HashMap<String, DBTable>();

    public DBScheme(String schemeName, HashMap<String, DBTable> tables)
    {
        this.schemeName = schemeName;
        if (tables != null)
            this.tables = tables;
    }

    public void addTable(String tableName, DBTable table)
    {
        tables.put(tableName, table);
    }

    public String getSchemeName()
    {
        return schemeName;
    }

    public HashMap<String, DBTable> getTables()
    {
        return tables;
    }

    public DBTable getTable(String tableName)
    {
        return tables.get(tableName);
    }
}
